package day2.Exer;

import java.util.Scanner;

public class Exer7 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输入一串字符");
        StringBuilder str = new StringBuilder();
        str.append(in.next());
        for (int i = 0; i < str.length() ; i++) {
            if (((int) str.charAt(i) >= 65 && (int) str.charAt(i) <= 90) || ((int) str.charAt(i) >= 97 && (int) str.charAt(i) <= 122)) {
                continue;
            }
            str = str.delete(i, i + 1);
            i--;
        }
        System.out.println(str);
    }
}
